<?php
/**
 * Created by PhpStorm.
 * User: ningtaoli
 * Date: 2018/4/24
 * Time: 下午5:35
 */

namespace app\common\validate;


use think\Validate;

class pro extends Validate
{
    protected $rule =   [
        'product_name'  => 'require',
        'product_price'   => 'require|number',
        'product_num' => 'require|number',
        'product_fre' => 'require|number',
        'product_feel' => 'require|number',
        'product_fen' => 'require|number'
    ];
    protected $message  =   [
        'product_name.require' => '产品名称不能为空！',
        'product_price.number'     => '产品价格必须为数字！',
        'product_price.require'     => '产品价格不能为空！',
        'product_num.number'     => '产品数量必须为数字！',
        'product_num.require'     => '产品数量不能为空！',
        'product_fre.number'     => '期限必须为数字！',
        'product_fre.require'     => '期限不能为空！',
        'product_feel.number'     => '每次返利必须为数字！',
        'product_feel.require'     => '每次返利不能为空！',
        'product_fen.number'     => '每人限购份额必须为数字！',
        'product_fen.require'     => '每人限购份额不能为空！',
    ];
}